package org.lanqiao.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class judgmentEmail {
    public static boolean isEmail(String string) {
        if (string == null) {
            return false;
        } else {
            String regEx1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
            Pattern p;
            Matcher m;
            p = Pattern.compile(regEx1);
            m = p.matcher(string);
            if (m.matches()) {
                return true;
            } else {
                return false;
            }
        }
    }

}
